/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"4D52BFEF-218E-4A1A-B424-4830476BFB55"}
 */
var titulo_defecto = "Productos";
/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"84591A5E-8A65-4214-8935-293B7DB9E484"}
 */
var icono_defecto = "media:///components_ico.png";


/**
 * @param {JSEvent} event
 * @properties={typeid:24,uuid:"9BACAA59-49CC-45F2-9932-026D8487B90C"}
 */
function btn_aceptar(event){
	
	_super.btn_aceptar(event);
}

/**
 * @param {JSEvent} event
 * @properties={typeid:24,uuid:"5EBCD4E9-5C25-4B3D-9410-57C70B47D5C5"}
 */
function btn_cancelar(event){
	
	_super.btn_cancelar(event);
}


/**
 * @param {JSEvent} event
 *
 * @properties={typeid:24,uuid:"7F9B9FD9-CCFD-41EE-9DB1-4A58CF72BB6B"}
 */
function doEdit(event){
	
	_super.doEdit(event);
	elements.btn_seleccionar.visible = true;
}

/**
 * @param {JSEvent} event
 *
 * @properties={typeid:24,uuid:"13F8E948-5F4B-47C0-999E-C70EA6DB7825"}
 */
function hide_btn_reset_fields(event){
	
	_super.hide_btn_reset_fields(event)
	elements.btn_seleccionar.visible = false;
}
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"0DD6F1E2-B3F5-4EF1-8B98-C65F1BF452AF"}
 */
function btn_seleccionar_fichero(event) {

	/** @type {plugins.file.JSFile} */
	var jsfile = plugins.file.showFileOpenDialog(1);
	
	if (jsfile){
		
		nombre_unico = application.getUUID().toString();
		nombre_imagen = jsfile.getName();
		var bytes = jsfile.getBytes();
		var img = plugins.images.getImage(bytes);
		thumbnail = img.resize(100,100);
	}
}


